import UserIndex from "@/views/user/AppIndex.vue";
import UserHome from "@/views/user/AppHome.vue";
import Catalogue from "@/views/user/Catalogue.vue";
import UserInfo from "@/views/common/UserInfo.vue"

const userRouter = {//所有的组件要跳转，必须先命名路由
  path: '/user', //访问的url
  name: 'userindex',
  component: UserIndex,
  redirect: '/user/home',
  children: [
    {path: '/user/login', redirect: to => '/login'},
    {path: '/user/home', name: 'userhome', component: UserHome},
    {path: '/user/info', name: 'userinfo', component: UserInfo},
    {path: '/user/catalogue', name: 'usercatalogue', component: Catalogue},
  ]
}

export default userRouter
